package com.example.nacos.consumer.feign;

import com.example.nacos.consumer.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * contextId 用于区分名称一样的，多个feign接口
 *
 * @author tianshuo
 */
@FeignClient(value = "nacos-provider", contextId = "user")
public interface UserFeignClient {

    @GetMapping("/user/{id}")
    public User user(@PathVariable("id") Integer id);
}
